﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="HeTong_YuanLiao.aspx.cs" Inherits="syc.Sale.HeTong_YuanLiao" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
</head>
<body>
      <script type="text/javascript" language="javascript" src="/common.js"></script>
    <form id="form1" runat="server">
    <div id="wintop" class="wintop">原料采购合同</div>
        <asp:Panel ID="Panel1" runat="server" CssClass="panel">
            <asp:Button ID="Button_Finish" runat="server" Text="保 存" CssClass="button" 
                UseSubmitBehavior="False" onclick="Button_Finish_Click" />
            <span style="width:30px;"></span>
            <asp:Button ID="Button2" runat="server" 
                CssClass="button" Text="返回" onclick="Button2_Click" />
            
        </asp:Panel>
        <asp:Panel ID="Panel2" runat="server" CssClass="panel2">
            <asp:Label ID="Message" runat="server" Text="·准备就绪" CssClass="prompt"></asp:Label>
        </asp:Panel>


        <script>    putBillHead();</script>

        <table border="0" width="710" cellpadding="3" style="border-collapse: collapse;font-size:14px; padding:20px;">
	        <tr>
		        <td height="24" style="font-size:16px;" align="center"><b><u>陕西延长石油材料有限责任公司</u></b></td>
	        </tr>
	        <tr>
		        <td height="30" style="font-size:22px;" align="center">
		        <img alt="" src="/Icons/29.png" align="middle" onclick="makecalendar(document.getElementById('RiQi').value, document.getElementById('RiQi'));" />
		        <asp:TextBox ID="RiQi" runat="server" CssClass="intxt1" Width="120px"></asp:TextBox>
                <b>原料采购合同</b></td>
	        </tr>
	        <tr>
		        <td height="24" style="font-size:14px;padding-right:20px;" align="right">SYC/ZJ-XS-14</td>
	        </tr>
        </table>

     <table border="1" width="710" cellspacing="0" cellpadding="0" style="border-collapse: collapse;font-size:14px;" bordercolor="#666666">
        <tr>
	        <td width="30" align="center" rowspan="3">供<br />货<br />单<br />位</td>
	        <td width="80" height="30" align="center">名  称</td>
	        <td width="240">
                <asp:DropDownList ID="GongHuo" runat="server" Width="160px" AutoPostBack="True" 
                    DataSourceID="SqlDataSource1" DataTextField="名称" DataValueField="ID" 
                    onselectedindexchanged="GongHuo_SelectedIndexChanged">
                </asp:DropDownList>
            </td>
	        <td width="30" align="center" rowspan="3">收<br />货<br />单<br />位</td>
	        <td width="80" align="center">名  称</td>
	        <td width="240">
                陕西延长石油材料有限责任公司</td>
        </tr>
        
        <tr>
	        <td width="80" height="30" align="center">地  址</td>
	        <td width="240" align="center">
                <asp:TextBox ID="GongHuoDiZhi" runat="server" 
                    Width="240px" CssClass="blank_left" ReadOnly="True"></asp:TextBox></td>
	        <td width="80" align="center">地  址</td>
	        <td width="240">陕西省西安市枣园东路2号</td>
        </tr>
        <tr>
	        <td width="80" height="30" align="center">合同号</td>
	        <td width="240" align="center">
                <asp:TextBox ID="HeTongHao" runat="server" 
                    Width="234px" CssClass="intxt1" Text=""></asp:TextBox></td>
	        <td width="80" align="center">运输方式</td>
	        <td width="240">
                <asp:DropDownList ID="FaHuo" runat="server" Width="160px" 
                    DataSourceID="SqlDataSource3" DataTextField="Value" DataValueField="Value">
                </asp:DropDownList>
            </td>
        </tr>
        </table>
        <table width="710" border="1" cellspacing="0" cellpadding="0" style="border-collapse: collapse;font-size:14px;margin-top:-1px;" bordercolor="#666666">
            <tr>
	            <td width="25%" height="32" align="center">原料名称</td>
	            <td width="25%" align="center">钢 级</td>
	            <td width="25%" align="center">规格（D×S）mm</td>
	            <td width="25%" align="center">采购量（吨）</td>
            </tr>
            <tr>
	            <td height="32">
                    <asp:DropDownList ID="YuanLiao" runat="server" AutoPostBack="True" 
                        DataSourceID="SqlDataSource4" DataTextField="品名" DataValueField="ID" 
                        onselectedindexchanged="YuanLiao_SelectedIndexChanged" Width="160px">
                    </asp:DropDownList></td>
	            <td align="center">
                    <asp:TextBox ID="GangJi" runat="server" Width="176px" 
                        CssClass="blank_center" ReadOnly="True"></asp:TextBox></td>
	            <td align="center"><asp:TextBox ID="GuiGe" runat="server" Width="176px" 
                        CssClass="blank_center" Text="" ReadOnly="True"></asp:TextBox></td>
	            <td align="center">
                    <asp:TextBox ID="CaiGouLiang" runat="server" Width="170px" 
                        CssClass="intxt1" Text="" onKeyPress="if (event.keyCode!=46 && event.keyCode!=45 && (event.keyCode<48 || event.keyCode>57)) event.returnValue=false" ></asp:TextBox></td>
            </tr>
            <tr>
	            <td height="32" align="center">金&nbsp;&nbsp; 额</td>
	            <td align="center">
                    <asp:TextBox ID="Jine" runat="server" Width="170px" 
                        CssClass="intxt1" Text="0.00" 
                        
                        onKeyPress="if (event.keyCode!=46 && event.keyCode!=45 && (event.keyCode<48 || event.keyCode>57)) event.returnValue=false" ></asp:TextBox></td>
	            <td align="center">&nbsp;</td>
	            <td align="center">&nbsp;</td>
            </tr>            
        </table>
        <table width="710" border="1" cellspacing="0" cellpadding="0" style="border-collapse: collapse;font-size:14px;margin-top:-1px;" bordercolor="#666666">
            <tr>
	            <td width="30" height="80" align="center">备<br />注</td>
	            <td><asp:TextBox ID="BeiZhu" runat="server" CssClass="intxt1" Width="100%" Height="80px" TextMode="MultiLine"></asp:TextBox></td>
            </tr>
        </table>
        <table border="0" cellpadding="0" style="width:707px;border-collapse: collapse;font-size:14px;margin-top:4px;">
	            <tr>
                    <td width="30%" nowrap align="center">经办人：<asp:DropDownList ID="JingBan" 
                            runat="server" Width="100px" DataSourceID="SqlDataSource5" 
                            DataTextField="Value" DataValueField="Value">
                        </asp:DropDownList>
                    </td>
                    <td width="20%"> </td>
                    <td width="20%"> </td>
                    <td width="30%"nowrap align="center">部门主管：<asp:DropDownList ID="ZhuGuan" runat="server" 
                            Width="100px" DataSourceID="SqlDataSource6" DataTextField="Value" 
                            DataValueField="Value">
                        </asp:DropDownList>
                    </td>
                </tr>
	        </tr>

        </table>

        <script>    putBillFoot();</script>
        
    <script>
        var textboxs = document.getElementsByTagName("input");
        for (var i = 0; i < textboxs.length; i++) {
            if (textboxs[i].className == "pageturn" || textboxs[i].className == "intxt1" || textboxs[i].className == "intxt2") {
                textboxs[i].onfocus = function(e) { this.select(); };
            }
        }
    </script>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:SCMConnectionString1 %>" 
        SelectCommand="SELECT [ID], [名称], [地址] FROM [原料供货单位]"></asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource3" runat="server" 
        ConnectionString="<%$ ConnectionStrings:SCMConnectionString1 %>" 
        SelectCommand="SELECT [Value] FROM [系统变量] where [Name]='发货方式'"></asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource4" runat="server" 
        ConnectionString="<%$ ConnectionStrings:SCMConnectionString1 %>" 
        SelectCommand="SELECT [ID], [品名], [钢级], [规格] FROM [原料]"></asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource5" runat="server" 
        ConnectionString="<%$ ConnectionStrings:SCMConnectionString1 %>" 
        SelectCommand="SELECT [Value] FROM [系统变量] where [Name]='采购员'"></asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource6" runat="server" 
        ConnectionString="<%$ ConnectionStrings:SCMConnectionString1 %>" 
        SelectCommand="SELECT [Value] FROM [系统变量] where [Name]='采购主管'"></asp:SqlDataSource>

    <asp:DropDownList ID="DZList" runat="server" DataSourceID="SqlDataSource1" 
        DataTextField="地址" DataValueField="ID" Visible="False">
    </asp:DropDownList>

    <asp:DropDownList ID="GJList" runat="server" DataSourceID="SqlDataSource4" 
        DataTextField="钢级" DataValueField="ID" Visible="False">
    </asp:DropDownList>
    <asp:DropDownList ID="GGList" runat="server" DataSourceID="SqlDataSource4" 
        DataTextField="规格" DataValueField="ID" Visible="False">
    </asp:DropDownList>

    </form>
    
</body>
</html>
